import { get } from "../utils/requests";

const fileURL = {
  getDownloadLog: "/fileinfo/downloadlog",
  getSummary:"/fileinfo/summary",
  getUserDownInfo:"/fileinfo/downinfobyuser"
};

/**
 * 获取最近下载记录
 * @param {page, pageSize} pageInfo 
 * @returns {status:string, msg:string, total:number, result:array}
 */
export function getDownloadLog(pageInfo) {
  return get(fileURL.getDownloadLog, pageInfo);
}

/**
 * 获取数据概览
 * @returns {status:string, msg:string,  result:array}
 */
export function getSummary(){
    return get(fileURL.getSummary)
}

/**
 * 获取各用户下载记录
 * @param {page, pageSize} pageInfo 
 * @returns {status:string, msg:string, total:number, result:array}
 */
export function getUserDownInfo(pageInfo){
    return get(fileURL.getUserDownInfo, pageInfo)
}